Skip to main content

Model Schema

nodeeweb applications use mongoose as ODM so we create standard mongoose schema them core register them and create mongoose models.

Create and Modify

go to ./schema which create in root directory after first you start core application, then create your custom schema file base on this pattern: <name>.schema.ts

files which start with _ not follow by core

you can use <number>.<name>.schema.ts pattern which change compilation order

Access

for access specific model follow as below

const userModel = store.db.model<UserModel>('user')